<%@ Page Language="C#" MasterPageFile="~/IPMSMasterPage.master" AutoEventWireup="true" 
CodeFile="OptHeadingSet.aspx.cs" Inherits="OptHeadingSet" title="Project Monitoring System" 
culture="auto:en-US" uiculture="auto" meta:resourcekey="PageResource1" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server" Visible="false">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <div style="margin-left:10px;margin-right:10px;">
        <asp:Panel ID="SearchPanel" runat="server" HorizontalAlign="Center" Width="100%">
            <fieldset style="vertical-align: middle; height: 20px;">
                <table>
                    <tr>
                        <td style="vertical-align: top; text-align: right">
                            <asp:Label ID="lblSearchProcSet" runat="server" Text="Procedure Set:" meta:resourcekey="lblHeadingSetResource1"></asp:Label>
                        </td>
                        <td style="vertical-align: top; text-align: left">
                            <asp:TextBox ID="txtSearchProcSet" runat="server"></asp:TextBox>
                            </td>
                        <td style="vertical-align: top; text-align: right">
                            <asp:Label ID="lblSearchProcSetName" runat="server" Text="Procedure Set Name:" meta:resourcekey="lblHeadingSetNameResource1"></asp:Label>
                        </td>
                        <td style="vertical-align: top; text-align: left">
                            <asp:TextBox ID="txtSearchProcSetName" runat="server" Width="272px"></asp:TextBox>
                        </td>
                        <td><asp:Button ID="btnSearch" runat="server" Text="Search" CausesValidation="false" meta:resourcekey="btnSearch" OnClick="btnSearch_Click" /></td>
                    </tr>
                </table>
            </fieldset>
        </asp:Panel>
        <asp:Panel ID="Panel1" runat="server" Height="400px" Width="100%" HorizontalAlign="Left" meta:resourcekey="Panel1Resource1">
            <table width="100%">
                <tr>
                    <td style="vertical-align: top; height: 429px; width:50%">
                        <fieldset>
                            <legend>
                                <asp:Label ID="lblHeadingSetLegend" runat="server" Text="Procedure Set" meta:resourcekey="lblHeadingSetLegendResource1"></asp:Label>
                            </legend>
                            <asp:ObjectDataSource ID="ODSHeadingSet" runat="server" DeleteMethod="Delete" InsertMethod="Insert"
                                OldValuesParameterFormatString="original_{0}" SelectMethod="GetHeadingSetData"
                                TypeName="IPTableAdapters.HeadingSetTableAdapter" UpdateMethod="Update">
                                <DeleteParameters>
                                    <asp:Parameter Name="HeadingSet" Type="String" />
                                </DeleteParameters>
                                <UpdateParameters>
                                    <asp:Parameter Name="HeadingSetName" Type="String" />
                                    <asp:Parameter Name="UpdateBy" Type="String" />
                                    <asp:Parameter Name="HeadingSet" Type="String" />
                                </UpdateParameters>
                                <InsertParameters>
                                    <asp:Parameter Name="HeadingSet" Type="String" />
                                    <asp:Parameter Name="HeadingSetName" Type="String" />
                                    <asp:Parameter Name="CreateBy" Type="String" />
                                    <asp:Parameter Name="UpdateBy" Type="String" />
                                    <asp:Parameter Name="OwnerGroupID" Type="String" />
                                </InsertParameters>
                            </asp:ObjectDataSource>
                            <asp:GridView CssClass="Grid" ID="gvHS" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                BackColor="#DEBA84" BorderColor="#660000" BorderStyle="Solid" BorderWidth="1px"
                                CellPadding="0" CellSpacing="0" DataKeyNames="HeadingSet,HeadingSetName" DataSourceID="ODSHeadingSet"
                                EmptyDataText="No Heading Set record(s) available." OnSelectedIndexChanged="gvHS_SelectedIndexChanged"
                                meta:resourcekey="gvHSResource1" AllowPaging="True" PageSize="12" Width="100%" OnPageIndexChanging="gvHS_PageIndexChanging" OnRowCreated="gvHS_RowCreated">
                                <FooterStyle CssClass="GridFooterStyle"/>
                                <Columns>
                                    <asp:ButtonField CommandName="Select" DataTextField="HeadingSet" HeaderText="Procedure Set"
                                        SortExpression="HeadingSet" meta:resourcekey="ButtonFieldResource1">
                                        <ItemStyle Width="100px" Wrap="False" />
                                    </asp:ButtonField>
                                    <asp:BoundField DataField="HeadingSet" HeaderText="Procedure Set" ReadOnly="True"
                                        SortExpression="HeadingSet" Visible="False" meta:resourcekey="BoundFieldResource1">
                                        <ItemStyle Width="120px" Wrap="False" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="HeadingSetName" HeaderText="Procedure Set Name" SortExpression="HeadingSetName"
                                        meta:resourcekey="BoundFieldResource2">
                                        <ItemStyle Width="200px" Wrap="False" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="CreateBy" HeaderText="CreateBy" SortExpression="CreateBy"
                                        Visible="False" meta:resourcekey="BoundFieldResource3" />
                                    <asp:BoundField DataField="UpdateBy" HeaderText="UpdateBy" SortExpression="UpdateBy"
                                        Visible="False" meta:resourcekey="BoundFieldResource4" />
                                    <asp:BoundField DataField="OwnerGroupID" HeaderText="OwnerGroupID" SortExpression="OwnerGroupID"
                                        Visible="False" meta:resourcekey="BoundFieldResource5" />
					                <asp:TemplateField ItemStyle-Width="30" ItemStyle-HorizontalAlign="center" HeaderText="">
						                <ItemTemplate>
							                <asp:ImageButton ID="lbtnSelect" CommandName="Select" runat="server" CausesValidation="False" ImageUrl="Images/icon-view.jpg" />
						                </ItemTemplate>
					                </asp:TemplateField>
                                </Columns>
                                <RowStyle CssClass="GridRowStyle"/>
                                <AlternatingRowStyle CssClass="GridAltRowStyle"/>
                                <SelectedRowStyle CssClass="GridSelectedRowStyle"/>
                                <PagerStyle CssClass="GridPagerStyle" ForeColor="White"/>
                                <HeaderStyle CssClass="GridHeaderStyle" ForeColor="White" />
                            </asp:GridView>
                        </fieldset>
                    </td>
                    <td style="vertical-align: top; height: 429px; width:50%">
                        <fieldset>
                            <legend>
                                <asp:Label ID="lblHeadingSetTemplateLegend" runat="server" Text="Procedure Set Template" meta:resourcekey="lblHeadingSetTemplateLegendResource1"></asp:Label>
                            </legend>
                            <asp:ObjectDataSource ID="ODSHeadingSetTmplt" runat="server" OldValuesParameterFormatString="original_{0}"
                                SelectMethod="GetHeadingSetTemplateData" TypeName="IPTableAdapters.HeadingSetTemplateTableAdapter"
                                DeleteMethod="Delete" InsertMethod="Insert" UpdateMethod="Update">
                                <DeleteParameters>
                                    <asp:Parameter Name="Original_HeadingSet" Type="String" />
                                    <asp:Parameter Name="Original_HeadingCode" Type="String" />
                                    <asp:Parameter Name="Original_Section" Type="Int32" />
                                </DeleteParameters>
                                <InsertParameters>
                                    <asp:Parameter Name="HeadingSet" Type="String" />
                                    <asp:Parameter Name="HeadingCode" Type="String" />
                                    <asp:Parameter Name="Section" Type="Int32" />
                                    <asp:Parameter Name="CreateBy" Type="String" />
                                    <asp:Parameter Name="CreateDate" Type="DateTime" />
                                    <asp:Parameter Name="UpdateBy" Type="String" />
                                    <asp:Parameter Name="UpdateDate" Type="DateTime" />
                                    <asp:Parameter Name="OwnerGroupID" Type="String" />
                                </InsertParameters>
                                <UpdateParameters>
                                    <asp:Parameter Name="HeadingSet" Type="String" />
                                    <asp:Parameter Name="HeadingCode" Type="String" />
                                    <asp:Parameter Name="Section" Type="Int32" />
                                    <asp:Parameter Name="CreateBy" Type="String" />
                                    <asp:Parameter Name="CreateDate" Type="DateTime" />
                                    <asp:Parameter Name="UpdateBy" Type="String" />
                                    <asp:Parameter Name="UpdateDate" Type="DateTime" />
                                    <asp:Parameter Name="OwnerGroupID" Type="String" />
                                    <asp:Parameter Name="Original_HeadingSet" Type="String" />
                                    <asp:Parameter Name="Original_HeadingCode" Type="String" />
                                    <asp:Parameter Name="Original_Section" Type="Int32" />
                                </UpdateParameters>
                            </asp:ObjectDataSource>
                            <asp:GridView CssClass="Grid" ID="gvHST" runat="server" AutoGenerateColumns="False"
                                BackColor="#DEBA84" BorderColor="#660000" BorderStyle="Solid" BorderWidth="1px"
                                CellPadding="0" CellSpacing="0" DataKeyNames="HeadingSet,HeadingCode,Section"
                                DataSourceID="ODSHeadingSetTmplt" EmptyDataText="No Heading Set record is selected."
                                meta:resourcekey="gvHSTResource1" AllowPaging="True" PageSize="15" Width="100%" OnPageIndexChanging="gvHST_PageIndexChanging">
                                <Columns>
                                    <asp:BoundField DataField="HeadingSet" HeaderText="Procedure Set" ReadOnly="True"
                                        SortExpression="HeadingSet" Visible="False" meta:resourcekey="BoundFieldResource6">
                                        <ItemStyle Width="100px" Wrap="False" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Section" HeaderText="Section" ReadOnly="True" SortExpression="Section"
                                        meta:resourcekey="BoundFieldResource7">
                                        <ItemStyle Width="80px" Wrap="False" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="HeadingCode" HeaderText="Procedure Code" ReadOnly="True"
                                        SortExpression="HeadingCode" meta:resourcekey="BoundFieldResource8">
                                        <ItemStyle Width="120px" Wrap="False" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="CreateBy" HeaderText="CreateBy" SortExpression="CreateBy"
                                        Visible="False" meta:resourcekey="BoundFieldResource9" />
                                    <asp:BoundField DataField="UpdateBy" HeaderText="UpdateBy" SortExpression="UpdateBy"
                                        Visible="False" meta:resourcekey="BoundFieldResource10" />
                                    <asp:BoundField DataField="OwnerGroupID" HeaderText="OwnerGroupID" SortExpression="OwnerGroupID"
                                        Visible="False" meta:resourcekey="BoundFieldResource11" />
                                    <asp:BoundField DataField="HeadingName" HeaderText="Name" ReadOnly="True" SortExpression="HeadingName"
                                        meta:resourcekey="BoundFieldResource12" />
                                </Columns>
                                <HeaderStyle CssClass="GridHeaderStyle" ForeColor="White" />
                                <RowStyle CssClass="GridRowStyle"/>
                                <AlternatingRowStyle CssClass="GridAltRowStyle"/>
                                <SelectedRowStyle CssClass="GridSelectedRowStyle"/>
                                <PagerStyle CssClass="GridPagerStyle" ForeColor="White"/>
                                <FooterStyle CssClass="GridFooterStyle"/>
                            </asp:GridView>
                        </fieldset>
                        &nbsp;
                        <asp:LinkButton ID="lbtnProcedureSet" runat="server" meta:resourcekey="lbtnProcedureSet" OnClick="lbtnProcedureSet_Click">Procedure Set Template</asp:LinkButton></td>
                </tr>
            </table>
        </asp:Panel>
        <table width="100%">
            <tr>
                <td align="center">
                    <asp:Label ID="lblError" runat="server" CssClass="error" ForeColor="Red" Width="100%"
                        meta:resourcekey="lblErrorResource1"></asp:Label>
                </td>
            </tr>
        </table>
        <fieldset style="text-align: center">
            <div style="padding-top: 5px" />
            <table style="width: 723px">
                <tr>
                    <td style="vertical-align: top; width: 20%; text-align: right; height: 17px;">
                        <asp:Label ID="lblHeadingSet" runat="server" Text="Procedure Set" Width="100%" meta:resourcekey="lblHeadingSetResource1"></asp:Label></td>
                    <td style="text-align: left; height: 17px;">
                        <asp:TextBox ID="txtHeadingSet" runat="server" CssClass="required" meta:resourcekey="txtHeadingSetResource1"
                            MaxLength="30" Width="232px"></asp:TextBox>
                        <asp:Button ID="btnCountry" runat="server" Text="..." Width="21px" meta:resourcekey="btnCountryResource1" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtHeadingSet"
                            Display="Dynamic" ErrorMessage="Procedure Set is a required field." meta:resourcekey="RequiredFieldValidator1Resource1"
                            Enabled="False"></asp:RequiredFieldValidator></td>
                </tr>
                <tr>
                    <td style="vertical-align: top; width: 20%; text-align: right">
                        <asp:Label ID="lblHeadingSetName" runat="server" Text="Procedure Set Name" Width="100%"
                            meta:resourcekey="lblHeadingSetNameResource1"></asp:Label></td>
                    <td style="text-align: left">
                        <asp:TextBox ID="txtHeadingSetName" runat="server" Width="487px" meta:resourcekey="txtHeadingSetNameResource1"
                            MaxLength="100"></asp:TextBox></td>
                </tr>
                <tr>
                    <td style="text-align: center; height: 53px;" colspan="2">
                        &nbsp;<asp:Button ID="btnNew" runat="server" CausesValidation="False" CssClass="submit"
                            OnClick="btnNew_Click" Text="New" meta:resourcekey="btnNewResource1" />
                        <asp:Button ID="btnModify" runat="server" CausesValidation="False" CssClass="submit"
                            OnClick="btnModify_Click" Text="Edit" meta:resourcekey="btnModifyResource1" />
                        <asp:Button ID="btnSave" runat="server" CssClass="submit" OnClick="btnSave_Click"
                            Text="Save" meta:resourcekey="btnSaveResource1" />
                        <asp:Button ID="btnDelete" runat="server" CausesValidation="False" CssClass="submit"
                            OnClick="btnDelete_Click" Text="Delete" meta:resourcekey="btnDeleteResource1" />
                        <asp:Button ID="btnCancel" runat="server" CausesValidation="False" CssClass="reset"
                            OnClick="btnCancel_Click" Text="Cancel" meta:resourcekey="btnCancelResource1" /></td>
                </tr>
            </table>
            <asp:CheckBox ID="chkForOperation" runat="server" Visible="False" meta:resourcekey="chkForOperationResource1" /><asp:CheckBox
                ID="cbForUpdate" runat="server" Height="2px" Visible="False" Width="121px" meta:resourcekey="cbForUpdateResource1" />&nbsp;
            <asp:Panel ID="Panel5" runat="server" Height="350px" Style="display: none" CssClass="modalPopup"
                Width="467px" meta:resourcekey="Panel5Resource1">
                
                <asp:Panel ID="Panel6" runat="server" Style="cursor: move; background-color: #DDDDDD;
                    border: solid 1px Gray; color: Black" Width="100%" Height="20px" meta:resourcekey="Panel6Resource1">
                    <div>
                        <p style="width: 100%">
                            Select Country</p>
                    </div>
                </asp:Panel>
                <table>
                    <tr>
                        <td align="center">
                            <asp:Button ID="OKButton" runat="server" Text="OK" CssClass="submit" OnClick="OKButton_Click"
                                meta:resourcekey="OKButtonResource1" />
                            <asp:Button ID="btnSetBlank" runat="server" Text="Set Blank" CssClass="submit" OnClick="btnSetBlank_Click"
                                meta:resourcekey="btnSetBlankResource1" />
                            <asp:Button ID="Cancel2Button" runat="server" Text="Cancel" CssClass="submit" meta:resourcekey="CancelButtonResource1" />
                        </td>
                    </tr>
                </table>
                <asp:ObjectDataSource ID="ODSCombo" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="GetCountryData" TypeName="IPTableAdapters.CountryTableAdapter">
                 </asp:ObjectDataSource>
                <asp:UpdatePanel id="UpdatePanel1" runat="server">
                    <contenttemplate>
                        <asp:Panel runat="server" Height="100%" Width="442px" ID="Panel7" meta:resourceKey="Panel7Resource1">
                            <div style="padding: 3px">
                                <asp:GridView runat="server" AllowPaging="True" AutoGenerateColumns="False" CellPadding="3" CellSpacing="2" 
                                    DataKeyNames="Country,EnglishName" DataSourceID="ODSCombo" 
                                    BackColor="#DEBA84" BorderColor="#DEBA84" BorderWidth="1px" BorderStyle="None" CssClass="Grid" 
                                    Height="1px" Width="447px" ID="gvChooseCountry" meta:resourceKey="gvChooseCountry" 
                                    OnSelectedIndexChanged="gvChooseCountry_SelectedIndexChanged">
                                    <Columns>
                                        <asp:ButtonField CommandName="Select" DataTextField="Country" Text="Country" HeaderText="Country" SortExpression="Country" meta:resourceKey="ButtonFieldResource2"></asp:ButtonField>
                                        <asp:BoundField DataField="EnglishName" HeaderText="Name" SortExpression="EnglishName" meta:resourceKey="BoundFieldResource13"></asp:BoundField>
                                    </Columns>
                                    <FooterStyle BackColor="#F7DFB5" CssClass="GridFooterStyle" ForeColor="#8C4510"></FooterStyle>
                                    <HeaderStyle BackColor="DarkBlue" CssClass="GridHeaderStyle" Font-Bold="True" ForeColor="White"></HeaderStyle>
                                    <PagerStyle HorizontalAlign="Center" CssClass="GridPagerStyle" ForeColor="#8C4510"></PagerStyle>
                                    <RowStyle BackColor="#FFF7E7" CssClass="GridRowStyle" ForeColor="#8C4510"></RowStyle>
                                    <SelectedRowStyle BackColor="#738A9C" CssClass="GridSelectedRowStyle" Font-Bold="False" ForeColor="White"></SelectedRowStyle>
                                </asp:GridView>
                            </div>
                        </asp:Panel>
                    </contenttemplate>
                </asp:UpdatePanel>
                &nbsp;&nbsp;&nbsp;&nbsp;
            </asp:Panel>
            &nbsp;&nbsp;
            <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="btnCountry"
                PopupControlID="Panel5" BackgroundCssClass="modalBackground" OkControlID="btnCountry"
                CancelControlID="Cancel2Button" DropShadow="True" PopupDragHandleControlID="Panel6"
                DynamicServicePath="" Enabled="True" />
        </fieldset>
    </div>
</asp:Content>

